package com.lin.chapter12.dynamic;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class GamePlayH implements InvocationHandler {
	private Object obj;

	public GamePlayH(Object obj) {
		this.obj = obj;
	}

	@Override
	public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
		if (method.getName().equals("login"))
			System.out.println("有人在用我的账号登录");
		return method.invoke(obj, args);
	}
}
